<head>
    <meta charset="utf8">
</head>
<?php
// 打开数据库连接
include("../functions/db_conn.php");
$SociNo = $_POST['SociNo'];  // 社团编号
$StuNo=$_POST["StuNo"];  // 学号
$State = $_POST['State'];  // 志愿状态
// 更新志愿状态
$sql="update stusoci set State='".$State."' where SociNo='".$SociNo."' and StuNo='".$StuNo."'";
// 执行更新
$Result  =mysql_query($sql);
// 处理结束后跳回上一页
if($Result){
    echo "<script>";
    // echo "alert(\"更新成功！\");";
    echo "window.history.go(-1);";
    echo "</script>";
}
else{
    echo "<script>";
    // echo "alert(\"更新失败！\");";
    echo "window.history.go(-1);";
    echo "</script>";
}
?>